﻿#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <unordered_map>

using namespace std;
struct TreeNode {
	int val;
	TreeNode *left;
	TreeNode *right;
	TreeNode(int x) : val(x), left(NULL), right(NULL) {}
	
};

class Solution {
public:
	vector<vector<int>> ans;
	void cb(int start, int n, int total, vector<int> comb) {
		if (n == 0)
			ans.push_back(comb);
		else {
			for (int i = start; i <= total - n + 1; i++) {
				comb.push_back(i);
				cb(i + 1, n - 1, total, comb);
				comb.pop_back();
			}
		}
	}
	vector<vector<int>> combine(int n, int k) {
		vector<int> comb;
		cb(1, k, n, comb);
		return ans;
	}
};

int main()
{ 
	Solution sol;
	vector<int> test = { 5,3,1,1,1,3,73,1 };
	sol.combine(4, 2);
	cout <<endl;
}
